home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9091 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: news.primenet.com!not-for-mail
  2. From: gbe@primenet.com (Gary Edstrom)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help Wanted: Win95 Visual C++: Getting a Process ID
  5. Date: 27 Feb 1996 21:03:01 -0700
  6. Organization: Sequoia Software
  7. Sender: root@primenet.com
  8. Message-ID: <3133d466.340349558@news.primenet.com>
  9. References: <31320d3e.6676641@news.primenet.com> <313356B0.6258@afrodite.kih.no>
  10. X-Posted-By: ip081.lax.primenet.com
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. Paul Kenneth Egell-johnsen <paulken4@afrodite.kih.no> wrote:
  14. On Tue, 27 Feb 1996 20:08:32 +0100, you wrote:
  15.  
  16. >Gary Edstrom wrote:
  17. >
  18. >> What I want to do is as follows:  We have a program that is currently
  19. >> made up of 4 different processes.  One of the processes is responsible
  20. >> for starting all of the others.  Before starting any of the child
  21. >> processes, however, I want to check if they are already running on the
  22. >> system and if so, to terminate them before performing a new startup.
  23. >
  24. >Why would you do that? The user would get pretty pissed if you
  25. >close down a process which you haven't created (in this
  26. >program).
  27. >
  28. >Either you should notify the user first, or you just start a
  29. >copy of the process, containing the new data or whatever.
  30.  
  31. This is not your typical program.  It is the ONLY program running on a
  32. dedicated hospital based patient EKG monitoring system.  Having a
  33. watchdog program to keep an eye on all of the other process that it
  34. has started is a legal requirement for us.  If the watchdog detects
  35. that one of its child processes has crashed or locked up, it needs to
  36. clear that process out of memory and restart it.  It CANNOT wait for
  37. an operator OK.  It MUST be automatic.  If it is unable to restart the
  38. process, then it will automatically restart the system.  If the
  39. watchdog program itself has locked up or crashed, there is a hardware
  40. based timer board in the computer that will execute a hardware reset
  41. when it has not received tickle pulses from the watchdog for a
  42. specific period of time.  In other words, the system must be fail-safe
  43. and be able to recover from random system crashes.  When the system is
  44. first started, I want the watchdog to be able to check if any of the
  45. processes that it will be responsible for are currently running in
  46. memory.  If so, they are to be killed, as it is only valid to have a
  47. single copy of every process running.
  48.  
  49. --
  50. Gary Edstrom <gbe@primenet.com> | Sequoia Software
  51. PO Box 9573                     | Programming & Technical Services
  52. Glendale CA 91226-0573          | PGP Key ID: 0x1A0D44BD
  53. PGP Fingerprint: 72 AA 4F 73 05 53 89 C6  8A EE F4 EE D1 C0 13 8D 
  54.